package org.hxd.job.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.hxd.pojo.Job;
import org.hxd.units.PageModel;

import java.util.List;

public interface JobDao {
    List<Job> findjob(@Param("name") String name,@Param("pageModel") PageModel pageModel);
    //查询信息数量，全部信息name为null
    int findjobcount(String name);

    @Select("select id,name,remark from job_inf where id = #{id}")
    Job findJobById(int id);

    @Update("update job_inf set name = #{name},remark = #{remark} where id = #{id}")
    int modifyJob(Job job);

    int removeJob(@Param("ids") Integer[] ids);

    @Insert("insert into job_inf (name,remark) values(#{name},#{remark})")
    int addJob(Job job);
}
